package io.github.frailty9.crserver.model

import java.time.LocalDateTime
import com.mybatisflex.annotation.Column
import com.mybatisflex.annotation.Id

/**
 * 预约单位分配明细
 */
data class ReservationUnit(
    @Id
    override var id: Long? = null,
    /**
     * 关联 reservation.id
     */
    var reservationId: Long? = null,
    /**
     * 关联 resource_unit.id
     */
    var unitId: Long? = null,

    @Column(version = true)
    override var version: Int? = null,

    @Column(onInsertValue = "CURRENT_TIMESTAMP")
    var createTime: LocalDateTime? = null,

    @Column(onInsertValue = "CURRENT_TIMESTAMP", onUpdateValue = "CURRENT_TIMESTAMP")
    var updateTime: LocalDateTime? = null,

    @Column(isLogicDelete = true)
    override var deleted: Int? = null
) : BaseModel
